package project;

import java.util.TimerTask;
import project.RoboticArm;

//Timer timer = new Timer();
//TimerTask task = new MyTimerTask();

public class EventTimer extends TimerTask {
	
	int duration;
	
	private byte[] msg;
	
	public EventTimer(byte[] msg, int duration)
	{
		this.msg = msg;
		this.duration = duration;
	}
	
    public void run() {
		RoboticArm.getInstance().connection.write(msg);
		try {
			Thread.sleep(duration);
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
    }
}